import { get, post, fdelete, put } from "./require";
/**
 *菜单接口
 */
export const menuList = parmas => get("/channel/menu/list", parmas);
/**
 * api接口统一管理
 */
//登录接口
export const apiLogin = parmas => post("/channel/auto/login", parmas);
// 退出登录
export const apiLogout = parmas => post("/channel/auto/logout", parmas);
// 修改密码
export const apiUpdatePassword = parmas =>
  post("/sys/tbEmployee/updatePassword", parmas);
//修改授权密码
export const apiUpdatePasswordT = parmas =>
  post("/sys/tbEmployee/updateAuthPass", parmas);
/**
 * 组织结构页面接口
 */

//查询所有公司接口
export const pagelist = parmas => get("/sys/company/list", parmas);

//根据公司id查询部门下面部门
export const getDepartment = parmas => get(`/sys/department/list/${parmas}`);

/**
 * 员工管理模块所有接口
 */

//获取员工类型
export const getEmployee = parmas =>
  get(`/channel/dict/findByDictCode/${parmas}`);
//获取账号状态
export const getAstatus = parmas =>
  get(`/sys/dictItem/findByDictCode/${parmas}`);
//获取在职状态字典
export const getJobStates = parmas =>
  get(`/channel/dict/findByDictCode/${parmas}`);

/**
 * 产品模型配置
 */
// 获取产品模型配置数据
export const getProductList = parmas => get("/business/product/page", parmas);
//删除操作接口
export const delProduct = parmas =>
  fdelete(`/business/product/delete/${parmas}`);
//根据添加查询一条接口
export const getProductOne = parmas => get(`/channel/order/project/${parmas}`);
//查询html表集合
export const getProductHtml = parmas =>
  get(`/business/product/htmlAll`, parmas);
// 获取审批流集合
export const getProductApproveModel = parmas =>
  get(`/business/product/findApproveModel`, parmas);
// 根据htmlId查询详情
export const getProducthtmlById = parmas =>
  get("/business/product/htmlById" + "?id=" + parmas);

/**
 *
 *增值贷产品的所有接口
 */
//更新基本信息
export const putBaseInfo = parmas =>
  put("/business/order/updateMessage", parmas);
// 获取员工数据
export const postCompanyEmployList = parmas =>
  get(`/business/order/getEmployeeList`, parmas);
//删除接口
export const delOrder = parmas => put("/business/order/delete", parmas);
// 获取产品说明
export const getFindOneList = parmas => get(`/channel/order/project/${parmas}`);
// 获取操作信息
export const getfindListData = parmas =>
  get(`/business/operation/findList/${parmas}`);
//写一条接口
export const orderMessage = parmas => put("/business/order/message", parmas);
// 获取审批记录数据
export const getfindApproveRecordList = parmas =>
  get(`/business/order/findApproveRecordList/${parmas}`);
// 获取我要审批数据
export const getfindFilter = parmas =>
  get(`/business/order/findFilter/${parmas}`);
// 强制退回重新审批接口 更新状态
export const putUpdateStatus = parmas =>
  put("/business/order/updateStatus", parmas);
// 查询退回审批数据
export const getfindPrefixList = parmas =>
  get(`/business/order/findPrefixList/${parmas}`);
//根据id查询一条数据
export const getOrderOne = parmas => get(`/channel/order/findOne/${parmas}`);
//获取订单号
export const getOrderNumber = parmas => get(`/channel/order/number/${parmas}`);
//删除图片接口
export const delPic = parmas =>
  fdelete(`/channel/order/deleteAccessory/${parmas}`);
//添加订单
export const saveOrder = parmas => post("/channel/order/submit", parmas);
//关键订单号查询附件
export const getOrderFileByNumber = parmas =>
  get(`/business/accessory/findByNum/${parmas}`);
// 获取订单信息
export const getFindOrderMessage = parmas =>
  get(`/business/order/findOrderMessage/${parmas}`);
// 获取提成规则
export const getCalculation = parmas =>
  get(`/business/calculation/findOne/${parmas}`);
//初始化提成规则
export const getCalculationShow = parmas =>
  get(`/business/calculation/changeShow/${parmas}`);
//根据订单号查询表格信息
export const getOrderTable = parmas => get(`/channel/order/findOne/${parmas}`);
//提交审批
export const putOrderCommit = parmas => put(`/channel/order/commit/${parmas}`);
//模糊查询
export const getOrderListBy = parmas => get(`/channel/order/list`, parmas);
// 乐业分分期
export const getOrderListLy = parmas => get(`/channel/order/list`, parmas);
//待交件补登信息
export const getRecordModel = parmas =>
  get(`/business/order/findRecordModel/${parmas}`);
// 审批提交按钮
export const putCalculation = parmas =>
  put("/business/calculation/change", parmas);
// 同意按钮
export const putAffirm = parmas =>
  put(`/business/calculation/affirm/${parmas}`);
//集合标记状态
export const updateStatusList = parmas =>
  put(`/business/order/updateStatusList`, parmas);

//上传获取OSS凭证
export const getOssChan = parmas => get(`/channel/order/getOssAuth`, parmas);
//Oss成功，添加后台数据
export const addOssImg = parmas => post("/channel/order/addImg", parmas);
//oss删除图片接口
export const delOssPic = parmas =>
  fdelete(`/channel/order/deleteOssAccessory/${parmas}`);
// 处理更新状态
export const markUpdate = parmas => put("/business/order/markUpdate", parmas);

/**
 * 待收款
 */
//根据订单号查询待收款信息
export const getUpForm = parmas =>
  get(`/business/upForm/findOrderNumber`, parmas);
//根据订单号查询待权证信息
export const getWarrant = parmas => get(`/business/upForm/findWarrant`, parmas);

// 根据订单号查询分期信息
export const getChargePart = parmas => get(`/business/live/getInfo`, parmas);
// 财务查询接口
export const getChargeCaiwu = parmas => get(`/business/live/getCharge`, parmas);
// 添加修改权证信息
export const putUpWarrant = parmas => put(`/business/live/upWarrant`, parmas);
// 添加修改分期信息
export const putChargePart = parmas => put(`/business/live/chargePart`, parmas);
// 已放款修改分期信息
export const putUpServiceLoans = parmas =>
  put(`/business/live/upServiceLoans`, parmas);

//提价合同信息申请
export const postGuaranteeMoney = parmas =>
  put(`/business/upForm/GuaranteeMoney`, parmas);
//提交财务申请
export const postCharge = parmas => put(`/business/upForm/charge`, parmas);
//提交财务申请(乐业分分期)
export const postChargeFen = parmas => put(`/business/live/charge`, parmas);
//提交权证申请
export const postWarrant = parmas => put(`business/upForm/upWarrant`, parmas);
// 提交每月还款额
export const postChargeMy = parmas =>
  put(`/business/live/serviceCharge`, parmas);
// 根据订单号查询贷后信息
export const getLoansSuffix = parmas =>
  get(`/business/upForm/findLoansSuffix`, parmas);
// 提价贷后信息
export const postLoansSuffix = parmas =>
  put(`/business/upForm/upLoansSuffix`, parmas);
// 获取已中止和已归档基本信息
export const getFindForm = parmas => get(`/business/upForm/findForm`, parmas);

//根据订单号查询当前订单path路产品状态和更新情况
export const getProductUrl = parmas =>
  get(`/business/TbLeading/findProductUrl`, parmas);
//根据产品id查询跳转路径
export const getTbleadgUrl = parmas =>
  get(`/business/TbLeading/findLendingUrl`, parmas);
//安居分财务
export const putAjfCharge = parmas => put(`/business/upForm/ajfCharge`, parmas);
//安居分放贷
export const putAjfLoan = parmas => put(`/business/upForm/ajfLoan`, parmas);

/**
 * 合伙人奖金
 */

//待放款获取收费参考
export const getProductRefer = parmas =>
  get(`/business/product/chargeRefer`, parmas);
//获取意向申请金额
export const getIntention = parmas =>
  get("/business/calculation/getIntention", parmas);
//修改收费
export const getChargeCount = parmas =>
  post("/business/calculation/chargeCount", parmas);
//获取销售提成渠道提成
export const getupCharge = parmas =>
  post("/business/calculation/upCharge", parmas);
//待跟进状态变更
export const changeFollow = parmas => get("/business/order/follow/", parmas);

//公积金
//模糊查询
export const getAccOrderList = parmas =>
  get(`/business/fund/findFilterList`, parmas);
//获取公积金信息’
export const getAccInfo = parmas => get(`/business/fund/getInfo/${parmas}`);
//公积金更新客户资料
export const updaAccForm = parmas => put(`/business/fund/updateForm`, parmas);
//公积金财务
export const postChargeAccs = parmas => put(`/business/fund/change`, parmas);
//公积金反馈信息
export const updateBackMsg = parmas => put(`/business/fund/backMsg`, parmas);

/**
 * 按揭赎楼
 */
//模糊查询
export const getRedOrderList = parmas =>
  get(`/business/redeem/findFilterList`, parmas);
//按揭楼房
export const getInfoMort = parmas => get(`/business/redeem/getInfo/${parmas}`);
//按揭楼房更新客户资料
export const updaMortForm = parmas => put(`/channel/order/update`, parmas);
//赎楼信息提交
export const putRedAcc = parmas => put(`/business/redeem/take`, parmas);
//赎楼财务提交
export const putRedChage = parmas => put(`/business/redeem/charge`, parmas);
//放款权证提交
export const putRedWar = parmas => put(`/business/redeem/warrant`, parmas);
//放款垫资提交
export const putRedAdv = parmas => put(`/business/redeem/advance`, parmas);
//放款按揭提交
export const putRedMort = parmas => put(`/business/redeem/mortgage`, parmas);

/**
 *法拍房一类接口
 */
//模糊查询
export const getFapaiOrderList = parmas =>
  get(`/business/auction/findFilterList`, parmas);
//法拍房所有信息
export const getAucMort = parmas => get(`/business/auction/getInfo/${parmas}`);
//法拍房更新客户资料
export const updaAucForm = parmas =>
  put(`/business/auction/updateForm`, parmas);
//法拍房贷款信息
export const putAucMort = parmas => put(`/business/auction/mortgage`, parmas);
//强制退回重新审批接口 更新状态
export const putAucStatus = parmas =>
  put("/business/auction/updateStatus", parmas);
//法院信息
export const putAucCourt = parmas => put("business/auction/court", parmas);
//权证信息
export const putAucWar = parmas => put("business/auction/warrant", parmas);
///  收费信息 尾款
export const putAucCharg = parmas => put("business/auction/change", parmas);

// 查询区域
// 获取省市区
export const getDistrict = parmas => get(`/channel/order/district`, parmas);

/**
 *
 * 后台合同签约
 *
 */
// 查询是否能签约
export const getIsAgree = parmas =>
  get(`/channel/contract/sign/isAgree/${parmas}`);
// 完成附件上传
export const getCompleted = parmas =>
  get(`/channel/contract/sign/finger/completed/${parmas}`);
// 获取摄像头信息
export const postObtainRtc = parmas =>
  post(`/channel/contract/sign/obtain/rtc/${parmas}`);
// 删除文件
export const deleteFile = parmas =>
  fdelete(`/channel/contract/sign/delete/${parmas}`);
// 下载合同模板
export const postDownload = parmas =>
  post(`/channel/contract/sign/download/${parmas}`);
// 完成合同上传
export const getCompletedHt = parmas =>
  get(`/channel/contract/sign/template/completed/${parmas}`);
// 查询签约状态
export const getSginState = parmas =>
  get(`/channel/contract/sign/state/${parmas}`);
